package view.render.weapon
{
	import model.vo.weapon.FluteVo;
	
	import util.WeaponUtil;
	
	/**
	 * 笛子简表item
	 * @author £iang
	 * 
	 */	
	public class FluteSimpleItem extends BaseWeaponSimpleItem
	{
		//-----------------------------
		// variables
		//-----------------------------
		
		//-----------------------------
		// properties
		//-----------------------------
		
		//-----------------------------
		// setter&getter
		//-----------------------------
		
		//-----------------------------
		// methods
		//-----------------------------
		
		/**
		 * 设置item数据 
		 * @param data 数据
		 * 
		 */		
		public function setFluteData( data:FluteVo ):void
		{
			var nameStr:String = data.name + "(" + data.nickName +")";
			
			weaponId = data.weaponId;
			if ( data.isFinal  )
				firstLabel.text = "■";
			firstLabel.text += nameStr;
			firstLabel.color = WeaponUtil.getRareColor( data.rare );
			attackLabel.text = data.attack.toString();
			secondLabel.text = WeaponUtil.getMelodyText( data.melody );
			thirdLabel.text = WeaponUtil.getSimpleSharpeLabelText( data );
		}
		
		//-----------------------------
		// events
		//-----------------------------
		
		//-----------------------------
		// dispose
		//-----------------------------
		
		//-----------------------------
		// construction
		//-----------------------------
		
		/**
		 * 构造函数
		 *
		 */
		public function FluteSimpleItem()
		{
			super();
		}
	}
}